.layout {
  &__wnd--active {
    .layout-tab-bar .item--focus {
      box-shadow: inset 0 2px 0 0 var(--b3-theme-background-light) !important;

      & > .item__text {
        color: var(--b3-theme-on-background);
      }
    }
  }

  &__resize {
    cursor: row-resize;
    margin: -3px 0;
    height: 6px;
    width: 100%;
    position: relative;
    z-index: 2;

    &:hover:after {
      background-color: var(--b3-theme-primary-light);
    }

    &:after {
      content: "";
      width: 100%;
      height: 1px;
      display: block;
      background-color: var(--b3-border-color);
      top: 3px;
      position: absolute;
      left: 0;
      transition: var(--b3-transition);
    }

    &--lr {
      cursor: col-resize;
      width: 6px;
      margin: 0 -6px 0 0;
      height: auto;

      &:after {
        top: 0;
        width: 1px;
        left: 0;
        height: 100%;
      }
    }
  }

  &__empty {
    display: flex;
    height: 100%;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    background-color: var(--b3-theme-background);
    align-items: center;

    .b3-list-item {
      width: 204px;
      white-space: nowrap;
      font-size: 17px;
      color: var(--b3-theme-on-surface);
      margin-top: 8px !important;

      &:hover {
        color: var(--b3-theme-on-background);
      }
    }

    .b3-list-item__graphic {
      margin-right: 8px;
      height: 16px;
      width: 16px;
    }
  }

  &-tab {
    &-container {
      display: flex;
      position: relative;
      background-color: var(--b3-theme-surface);
      user-select: none;

      &__drag {
        background-color: var(--b3-theme-primary-lightest);
        position: absolute;
        z-index: 100;
        height: 100%;
        width: 100%;
        transition: var(--b3-transition);
      }
    }

    &-bar {
      list-style: none;
      align-items: center;
      overflow: auto;
      position: relative;
      background-color: var(--b3-theme-surface);

      &::-webkit-scrollbar {
        display: none;
      }

      &--drag {
        background-color: var(--b3-theme-primary-lightest);
      }

      .item {
        line-height: 22px;
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
        transition: var(--b3-transition);
        flex: 1;
        min-height: 30px;

        &:not(:last-child) {
          box-shadow: 2px -26px 0px 0px var(--b3-theme-surface), 1px -4px 1px 0px var(--b3-theme-on-surface-light);
        }

        &:hover:not(.item--focus) {
          background-color: var(--b3-list-hover);
          box-shadow: none;
          border-radius: 4px 4px 0 0;

          .item__text::after {
            background: linear-gradient(90deg, rgba(0, 0, 0, 0.001), var(--b3-list-hover));
          }
        }

        &--pin {
          flex: none;

          .item__text {
            max-width: 148px;
            padding-right: 8px;
            min-width: auto;
            font-style: normal;
            color: var(--b3-theme-on-background);
          }

          .item__close {
            display: none;
          }

          .item__graphic {
            padding-right: 8px;
          }
        }

        &--focus {
          background-color: var(--b3-theme-background);
          box-shadow: none !important;
          border-radius: 4px 4px 0 0;

          .item__text::after {
            background: linear-gradient(90deg, rgba(0, 0, 0, 0.001), var(--b3-theme-background));
          }
        }

        &--unupdate {
          font-style: italic;
          color: var(--b3-theme-on-surface);
        }

        &__icon {
          padding: 4px 8px;
          line-height: 22px;
          flex-shrink: 0;

          & > img,
          & > svg {
            float: left;
            height: 22px;
            width: 22px;
            border-radius: 2px;
          }
        }

        &__graphic {
          padding: 4px 0 4px 8px;
          height: 14px;
          width: 14px;
        }

        &__text {
          padding: 4px 0 4px 8px;
          min-width: 56px;
          @include text-clamp(1);
          flex: 1;
          text-align: center;
          -webkit-font-smoothing: subpixel-antialiased;
          color: var(--b3-theme-on-surface);
          transition: var(--b3-transition);
        }

        &__close {
          padding: 4px 8px;
          display: flex;
          align-items: center;

          svg {
            border-radius: 10px;
            height: 8px;
            width: 8px;
            color: var(--b3-theme-on-surface);
            transition: var(--b3-transition);
            padding: 4px;
          }

          &:hover svg {
            color: var(--b3-theme-on-background);
            background-color: var(--b3-theme-background-light);
          }
        }
      }
    }
  }
}

.dock {
  height: 30px;
  display: flex;
  padding: 0 30px;
  user-select: none;
  background-color: var(--b3-theme-surface);

  &#dockLeft {
    border-right: 1px solid var(--b3-border-color);
  }

  &#dockRight {
    border-left: 1px solid var(--b3-border-color);
  }

  &#dockTop,
  &#dockBottom {
    border-top: 1px solid var(--b3-border-color);
    border-bottom: 1px solid var(--b3-border-color);
  }

  svg {
    height: 16px;
    width: 16px;
  }

  &--vertical {
    width: 30px;
    flex-direction: column;
    height: 100%;
    padding: 0;

    .dock__item {
      margin: 8px 3px;

      &[data-index="0"]:after {
        top: -26px;
        bottom: auto;
      }

      &[data-index="1"]:after {
        bottom: 100%;
      }
    }
  }

  &__item {
    padding: 4px;
    color: var(--b3-theme-on-surface-light);
    display: flex;
    border-radius: 2px;
    margin: 3px 8px;

    &:hover {
      color: var(--b3-theme-on-background);
      background-color: var(--b3-theme-background-light);
    }

    &--active {
      color: var(--b3-theme-on-background);
    }
  }
}
